#include<bits/stdc++.h>
using namespace std;
int main()
{
	int s;
	long long sum=0,ans=0;
	while(cin>>s)
	{
		ans+=s;
		ans+=sum;
		sum+=s;
	}
	cout<<ans+s;
    return 0;
}
